import request from '../utils/request.js';

// 获取当前课程的
export const getlevel = (params) => {
	return request({
		url: `/system/miniword/library/list`,
		method: 'get',
		params,
	})
}

//获取分类列表
export const getTypeList = () => {
	return request({
		url: `/system/miniword/class/list`,
		method: 'get',
		
	})
}


//获取关卡当前课程的关卡

export const getLevel = (id) => {
	return request({
		url: `/system/miniword/stage/list?libid=` + id,
		method: 'get',

	})
}



export const getremain = () => {
	return request({
		url: `/web/miniword/remain`,
		method: 'get',

	})
}
//获取关卡的单词

export const getWords = (data) => {
	return request({
		url: `/web/miniword/content`,
		method: 'post',
		data
	})
}




//提交关卡信息

export const postSubmit = (data) => {
	return request({
		url: `/web/miniword/submit`,
		method: 'post',
		data
	})
}



//获取关卡排行

export const getTop = (data, index, size) => {
	return request({
		url: `/web/miniword/top?index=${index}&size=${size}`,
		method: 'post',
		data
	})
}